package com.exam.service.serviceImpl;

import com.exam.entity.Resource;
import com.exam.mapper.ResourceMapper;
import com.exam.service.ResourceService;

import java.util.List;

public class ResourceServiceImpl implements ResourceService {

    private ResourceMapper resourceMapper;

    public void setResourceMapper(ResourceMapper resourceMapper) {
        this.resourceMapper = resourceMapper;
    }

    @Override
    public int save_upload_resource(Resource resource) {
        return resourceMapper.save_upload_resource(resource);
    }

    @Override
    public List<Resource> get_all_resource() {
        return resourceMapper.get_all_resource();
    }

    @Override
    public int update_resource_state_by_r_id(Resource resource) {
        return resourceMapper.update_resource_state_by_r_id(resource);
    }

    @Override
    public int del_resource_state_by_r_id(int r_id) {
        return resourceMapper.del_resource_state_by_r_id(r_id);
    }

    @Override
    public List<Resource> get_resource_by_r_state() {
        return resourceMapper.get_resource_by_r_state();
    }

    @Override
    public int num6() {
        return resourceMapper.num6();
    }
}
